<template>
  <div v-loading="mapLoading" class="content">
    <MapContent />
    <TopSearch />
    <topRegionPoint />
    <mapcontrol></mapcontrol>
    <!-- <TopBar /> -->
  </div>
</template>

<script setup lang="ts">
import MapContent from '@/pages/forestry/components/map-content.vue'
import TopSearch from '@/pages/forestry/components/top-search.vue'
// import TopBar from '@/pages/forestry/components/top-bar.vue'
import topRegionPoint from '@/pages/forestry/components/top-regionPoint.vue'
import mapcontrol from '@/layouts/mapcontrol/control.vue'

import { fireInsuranceStore } from '@/pages/forestry/store/store'

const fireStore = fireInsuranceStore()
const mapLoading = computed(() => fireStore.mapLoading)

// 左侧折叠效果
const isShrink = ref(false)
provide('isShrink', isShrink)

// 顶部菜单选项
const componentVisible = ref('lqhdjc')
provide('componentVisible', componentVisible)

const timeIndex = ref(0)
provide('timeIndex', timeIndex)
const timerId = ref(null)
provide('timerId', timerId)
const timeCurrent = ref({})
provide('timeCurrent', timeCurrent)

// 色斑图数据
const sbtMap = ref([])
provide('sbtMap', sbtMap)
//网格预报点击地图经纬度
let clickLatlng = ref({ lat: '', lng: '' })
provide('clickLatlng', clickLatlng)
onUnmounted(() => {
  useEventBus('handleRemoveAllLayer').emit()
})
</script>

<style scoped lang="scss">
.content {
  width: 100%;
  height: 100%;
  position: relative;
}
</style>
